<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    // 以像素计，屏幕的大小
    var screenWidth = window.screen.width;
    var screenHeight = window.screen.height;

    console.log('屏幕的宽度为: ' + screenWidth);
    console.log('屏幕的高度为: ' + screenHeight);
</script>
</body>
</html>